{if $smarty.get.client_list_page_nr}{assign var="curent_page" value=$smarty.get.client_list_page_nr}{else}{assign var="curent_page" value=0}{/if}

{if $smarty.get.client_group_filter_id > 0}
	{ext->class_function class="clients" func="get_clients_info_by_group_id" id=$smarty.get.client_group_filter_id page=$curent_page items_per_page=$_var.clients_per_page order=$smarty.get.client_form_field_name assign="clients_l"}
	{assign var="clients_list" value=$clients_l.list}
	{assign var="page_data" value=$clients_l.pages}
{elseif $smarty.get.client_form_field_name}
	{ext->class_function class="clients" func="get_all_clients_info_with_groups_and_order" order=$smarty.get.client_form_field_name page=$curent_page items_per_page=$_var.clients_per_page assign="clients_l"}
	{assign var="clients_list" value=$clients_l.list}
	{assign var="page_data" value=$clients_l.pages}
{else}
	{ext->class_function class="clients" func="get_all_clients_info_with_groups" order=$smarty.get.client_form_field_name page=$curent_page items_per_page=$_var.clients_per_page assign="clients_l"}
	{assign var="clients_list" value=$clients_l.list}
	{assign var="page_data" value=$clients_l.pages}
{/if}									

{assign var="clients_list2" value=$clients_list}
{ext->countArray array=$clients_list assign="ct"}

{ext->class_function class="shop_cart" module="client_history" assign="is_module"}
{capture name="list"}
	{foreach from=$clients_list2 item="el" key="key"}	
		{include file="admin/modules/client/client_list_item.html"}					
	{/foreach}	
{/capture}

<form name="child_list" action="index.php" enctype="multipart/form-data" method="post">
<input name="admin" type="hidden" value="1">
<input name="mod" type="hidden" value="client">
<input name="act" type="hidden" value="del">
<input name="module" type="hidden" value="clients">
<input name="referer" type="hidden" value="{ext->get_referer}">
<table width="100%" cellpadding="0" cellspacing="0" border="6" bordercolor="#DBE1E5" bgcolor="#DBE1E5">
<tr>
<td>
{include file="admin/modules/client/client_menu.html"}
<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom:1px solid #25404E">
	<tr>
		<td height="12"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>	
</table>

{if $ct>0}
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-bottom:1px solid #D6DBDE ">
	<tr>		
		<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="70">{t t='Žymėjimas'}</td>	
		<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="50">{t t='ID'}</td>		
		<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="120">{t t='Data'}</td>		
		<td style="font-size:9px; color:#4C4C4C; text-align:left; padding:0px 0px 0px 10px; border-right:1px solid #D6DBDE" width="200">{t t='El. pašto adresas'}</td>	
		<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="50">{t t='Laukai'}</td>
		{if $is_module == 1}
		<td style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="100">{t t='Kliento užsakymai'}</td>
		{/if}
		{if $smarty.get.client_form_field_name}
		<td style="font-size:9px; color:#000; text-align:left; padding:0px 0px 0px 10px; border-right:1px solid #D6DBDE" width="150">
		{$smarty.get.client_form_field_name|truncate:30:"...":true}
		</td>	
		{/if}
		<td style="font-size:9px; color:#4C4C4C; text-align:left; padding:0px 0px 0px 10px; border-right:1px solid #D6DBDE" width="37">{t t='Grupės'}</td>	
		<td style="font-size:9px; color:#4C4C4C; text-align:left; padding:0px 0px 0px 10px; border-right:1px solid #D6DBDE">{t t='Priklauso grupėms'}</td>
	</tr>
</table>
<span class="this">
{$smarty.capture.list}
</span>
{else}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="50" bgcolor="#FFFFFF" align="center" style="padding:15px">
		{t t='Šioje grupėje klientų nėra'}
		{if $smarty.get.client_group_filter_id || $smarty.get.client_form_field_name}.
		  <a href="index.php?admin=1" target="_self"><strong>{t t='Atkreipkite dėmesį, kad įjungtas filtravimas. Norėdami jį išjungti spauskite čia!'}</strong></a>
		{/if} 
		</td>		
	</tr>
</table>
{/if}
<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #25404E">
	<tr>
		<td height="1"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>	
</table>
<table width="100%" cellpadding="0" cellspacing="0" style="border-top:#25404E ">	
	<tr>
		<td height="12"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>	
</table>
{include file="admin/modules/client/client_menu.html"}
</td>		
</tr>
</table>
</form>
